//
//  fwfweew_Tool.h
//  kratos_framework_Example
//
//  Created by 7yao.top on 2018/10/24.
//  Copyright © 2018年 kratos_framework. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <Photos/PHPhotoLibrary.h>

@interface Kratos_Tool : NSObject
///单纯改变一句话中的某些字的颜色
/// color 需要改变成的颜色
/// totalStr 总的字符串
/// subArray 需要改变颜色的文字数组
+(NSMutableAttributedString *)Kratos_changeCorlorWithColor:(UIColor *)color Kratos_TotalString:(NSString *)totalStr SubStringArray:(NSArray *)subArray;


///单纯改变句子的字间距（需要 ）
///totalString 需要更改的字符串
///space       字间距
+ (NSMutableAttributedString *)Kratos_changeSpaceWithTotalString:(NSString *)totalString Kratos_Space:(CGFloat)space;


///改变某些文字的颜色 并单独设置其字体
/// font        设置的字体
/// color       颜色
/// totalString 总的字符串
/// subArray    想要变色的字符数组
+ (NSMutableAttributedString *)Kratos_changeFontAndColor:(UIFont *)font Kratos_Color:(UIColor *)color  Kratos_Space:(CGFloat)space  Kratos_TotalString:(NSString *)totalString Kratos_SubStringArray:(NSArray *)subArray;





+ (void)Kratos_getScreenImageWithView:(UIView *)view Kratos_completionHandle:(void (^)(NSError *, NSString *))completionHandler;
///请求相册权限
+ (void)requestPhoto;

///检查相册访问权限
+ (void)Kratos_checkPhotoStauts:(void(^)(PHAuthorizationStatus photoAuthorStatus))status;

///获取随机数字
+ (int)Kratos_getRandomNumber:(int)from to:(int)to;
///检测是否手机号码
+ (BOOL)Kratos_valiMobile:(NSString *)mobile;

///获取时间戳
+ (NSString *)Kratos_getTimestamp;


+ (NSString *)Kratos_currentDateStr;
/**
 *  正则匹配返回符合要求的字符串 数组
 *
 *  @param string   需要匹配的字符串
 *  @param regexStr 正则表达式
 *
 *  @return 符合要求的字符串 数组 (按(),分级,正常0)
**/
+ (NSArray *)Kratos_matchString:(NSString *)string Kratos_toRegexString:(NSString *)regexStr;

///获取设备名字
+(NSString *)Kratos_getDeviceName_Kratos;

///获取AppleIFA
+ (NSString *)getAppleIFA;

#pragma mark - 打开外部协议
+ (void)Kratos_openScheme_ggg:(NSString *)scheme;

+ (void)Kratos_ModifyUserAgent_ggg;

///字符串逆序
+ (NSString *)Kratos_inputValue:(NSString *)str;


#pragma mark - 字典转为字符串
+ (NSString*)Kratos_dictionaryToJson_ccc:(NSDictionary *)dic;

+ (UIViewController*)Kratos_currentViewController;
#pragma mark - 保存callBack
+ (BOOL)Kratos_saveCallBack_Kratos:(NSDictionary *)info;

#pragma mark -获取callBack信息
+ (BOOL )Kratos_getCallback_Kratos;

@end
